/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author ylz
 */
@Entity
@Table(name = "news_k16menu")
//@NamedQueries({@NamedQuery(name = "NewsK16Menu.findAll", query = "SELECT n FROM NewsK16Menu n"), @NamedQuery(name = "NewsK16Menu.findById", query = "SELECT n FROM NewsK16Menu n WHERE n.id = :id"), @NamedQuery(name = "NewsK16Menu.findByCname", query = "SELECT n FROM NewsK16Menu n WHERE n.cname = :cname"), @NamedQuery(name = "NewsK16Menu.findByIsdefault", query = "SELECT n FROM NewsK16Menu n WHERE n.isdefault = :isdefault")})
public class NewsK16Menu implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;
    @Column(name = "cname")
    private String cname;
    @Column(name = "isdefault")
    private Integer isdefault;
    @Column(name = "note")
	private String note;
    @Column(name = "lastversion")
    private Integer lastversion;
    
    public NewsK16Menu() {
    }

    public NewsK16Menu(Integer id) {
        this.id = id;
    }

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	public String getCname() {
		return cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	public Integer getIsdefault() {
		return isdefault;
	}

	public void setIsdefault(Integer isdefault) {
		this.isdefault = isdefault;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Integer getLastversion() {
		return lastversion;
	}

	public void setLastversion(Integer lastversion) {
		this.lastversion = lastversion;
	}

	@Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsK16Menu)) {
            return false;
        }
        NewsK16Menu other = (NewsK16Menu) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsK16Menu[id=" + id + "]";
    }

}
